Scheduling of i/o writes in a storage environment

ABSTRACT

A system and method for effectively scheduling read and write operations among a plurality of solid-state storage devices. A computer system comprises client computers and data storage arrays coupled to one another via a network. A data storage array utilizes solid-state drives and Flash memory cells for data storage. A storage controller within a data storage array comprises an I/O scheduler. The data storage controller is configured to receive requests targeted to the data storage medium, said requests including a first type of operation and a second type of operation. The controller is further configured to schedule requests of the first type for immediate processing by said plurality of storage devices, and queue requests of the second type for later processing by the plurality of storage devices. Operations of the first type may correspond to operations with an expected relatively low latency, and operations of the second type may correspond to operations with an expected relatively high latency.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to computer networks and, more particularly, tocomputing data storage systems.

2. Description of the Related Art

As computer memory storage and data bandwidth increase, so does theamount and complexity of data that businesses manage. Large-scaledistributed storage systems, such as data centers, typically run manybusiness operations. A distributed storage system may be coupled to anumber of client computers interconnected by one or more networks. Ifany portion of the distributed storage system has poor performance orbecomes unavailable, company operations may be impaired or stoppedcompletely. Such distributed storage systems seek to maintain highstandards for data availability and high-performance functionality.

Within storage systems themselves, file system and storage device-levelinput/output (I/O) schedulers generally determine an order for read andwrite operations in addition to providing steps for how the operationsare to be executed. For example, non-sequential read and writeoperations may be more expensive to execute for a storage device (e.g.,in terms of time and/or resources) than sequential read and writeoperations. Therefore, I/O schedulers may attempt to reducenon-sequential operations. In addition, I/O schedulers may provide otherfunctions such as starvation prevention, request merging, andinter-process fairness.

At least the read and write response times may substantially differbetween storage devices. Such differences may be characteristic of thetechnology itself. Consequently, the technology and mechanismsassociated with chosen data storage devices may determine the methodsused to perform effective I/O scheduling. For example, many currentalgorithms were developed for systems utilizing hard disk drives (HDDs).HDDs comprise one or more rotating disks, each coated with a magneticmedium. These disks rotate at a rate of several thousand rotations perminute. In addition, an electro-magnetic actuator is responsible forpositioning magnetic read/write devices over the rotating disks. Themechanical and electro-mechanical design of the device affects its I/Ocharacteristics. Unfortunately, friction, wear, vibrations andmechanical misalignments may create reliability issues as well as affectthe I/O characteristics of the HDD. Many current I/O schedulers aredesigned to take account for the input/output (I/O) characteristics ofHDDs.

One example of another type of storage medium is a Solid-State Drive(SSD). In contrast to HDDs, SSDs utilize solid-state memory to storepersistent data rather than magnetic media devices. The solid-statememory may comprise Flash memory cells. Flash memory has a number offeatures, which differ from that of hard drives. For example, Flashmemory cells are generally erased in large blocks before being rewrittenor reprogrammed. Flash memory is also generally organized in complexarrangements, such as dies, packages, planes and blocks. The size andparallelism of a chosen arrangement, the wear of the Flash memory overtime, and the interconnect and transfer speeds of the device(s) all mayvary. Additionally, such devices may also include a flash translationlayer (FTL) to manage storage on the device. The algorithms utilized bythe FTL can vary and may also contribute to variations in the behaviorand/or performance of the device. Consequently, high performance andpredictable latencies may not generally be achieved in systems usingflash based SSDs for storage while utilizing I/O schedulers designed forsystems such as hard drives which have different characteristics.

In view of the above, systems and methods for effectively schedulingread and write operations among a plurality of storage devices aredesired.

SUMMARY OF THE INVENTION

Various embodiments of a computer system and methods for effectivelyscheduling read and write operations among a plurality of solid-statestorage devices are disclosed.

In one embodiment, a computer system comprises a plurality of clientcomputers configured to convey read and write requests over a network toone or more data storage arrays coupled to receive the read and writerequests via the network. Contemplated is a data storage array(s)comprising a plurality of storage locations on a plurality of storagedevices. In various embodiments, the storage devices are configured in aredundant array of independent drives (RAID) arrangement for datastorage and protection. The data storage devices may include solid-statememory technology for data storage, such as Flash memory cells.Characteristics of corresponding storage devices are used to scheduleI/O requests to the storage devices. Characteristics may includepredicted response times for I/O requests, device age, any correspondingcache size, access rates, error rates, current I/O requests, completedI/O requests, and so forth.

In one embodiment, an I/O scheduler is configured to receive read andwrite requests and schedule the read and write requests for processingby a plurality of storage devices. The storage devices may exhibitvarying latencies depending upon the operations being serviced, and mayalso exhibit unscheduled or unpredicted behaviors at various times thatcause performance to vary from the expected or desired. In variousembodiments these behaviors correspond to behaviors in which the devicesare functioning properly (i.e., not in an error state), but are simplyperforming at a less than expected or desired level based on latenciesand/or throughput. Such behaviors and performance may be referred to as“variable performance” behaviors. These variable performance behaviorsmay, for example, be exhibited by technologies such as flash basedmemory technologies. Contemplated is a storage controller that isconfigured to receive requests targeted to the data storage medium, saidrequests including a first type of operation and a second type ofoperation. The controller is further configured to schedule requests ofthe first type for immediate processing by said plurality of storagedevices, and queue requests of the second type for later processing bythe plurality of storage devices. Operations of the first type maycorrespond to operations with an expected relatively low latency, andoperations of the second type may correspond to operations with anexpected relatively high latency. Low latency operation may correspondto read operations and high latency operations may include writeoperations. Also contemplated are embodiments wherein subsequent toqueuing a plurality of requests corresponding to the second type ofoperation, the storage controller is configured to cease processingrequests corresponding to the first type of operation and process onlythose requests corresponding to the second type of operation.

These and other embodiments will become apparent upon consideration ofthe following description and accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a generalized block diagram illustrating one embodiment ofnetwork architecture.

FIG. 2 depicts a conceptual model according to one embodiment of acomputing system.

FIG. 3 is a generalized flow diagram illustrating one embodiment of amethod for adjusting I/O scheduling to reduce unpredicted variable I/Oresponse times on a data storage subsystem.

FIG. 4 is generalized block diagram illustrating one embodiment of amethod for segregating operations issued to a storage device.

FIG. 5 is generalized flow diagram illustrating one embodiment of amethod for developing a model to characterize the behavior of storagedevices in a storage subsystem.

FIG. 6 is a generalized block diagram illustrating one embodiment of astorage subsystem.

FIG. 7 is a generalized block diagram illustrating another embodiment ofa device unit.

FIG. 8 is a generalized block diagram illustrating another embodiment ofa state table.

FIG. 9 is a generalized flow diagram illustrating one embodiment of amethod for adjusting I/O scheduling to reduce unpredicted variable I/Oresponse times on a data storage subsystem.

FIG. 10 is a generalized flow diagram illustrating one embodiment of amethod for maintaining read operations with efficient latencies onshared data storage.

FIG. 11 is a generalized flow diagram illustrating one embodiment of amethod for reducing a number of storage devices exhibiting variable I/Oresponse times.

FIG. 12 is a generalized flow diagram illustrating one embodiment of amethod for maintaining read operations with efficient latencies onshared data storage.

While the invention is susceptible to various modifications andalternative forms, specific embodiments are shown by way of example inthe drawings and are herein described in detail. It is to be understood,however, that drawings and detailed description thereto are not intendedto limit the invention to the particular form disclosed, but on thecontrary, the invention is to cover all modifications, equivalents andalternatives falling within the spirit and scope of the presentinvention as defined by the appended claims.

DETAILED DESCRIPTION

In the following description, numerous specific details are set forth toprovide a thorough understanding of the present invention. However, onehaving ordinary skill in the art will recognize that the invention mightbe practiced without these specific details. In some instances,well-known circuits, structures, signals, computer program instruction,and techniques have not been shown in detail to avoid obscuring thepresent invention.

Referring to FIG. 1, a generalized block diagram of one embodiment of anetwork architecture 100 is shown. As described further below, oneembodiment of network architecture 100 includes client computer systems110 a-110 b interconnected to one another through a network 180 and todata storage arrays 120 a-120 b. Network 180 may be coupled to a secondnetwork 190 through a switch 140. Client computer system 110 c iscoupled to client computer systems 110 a-110 b and data storage arrays120 a-120 b via network 190. In addition, network 190 may be coupled tothe Internet 160 or other outside network through switch 150.

It is noted that in alternative embodiments, the number and type ofclient computers and servers, switches, networks, data storage arrays,and data storage devices is not limited to those shown in FIG. 1. Atvarious times one or more clients may operate offline. In addition,during operation, individual client computer connection types may changeas users connect, disconnect, and reconnect to network architecture 100.Further, while the present description generally discusses networkattached storage, the systems and methods described herein may also beapplied to directly attached storage systems and may include a hostoperating system configured to perform one or more aspects of thedescribed methods. Numerous such alternatives are possible and arecontemplated. A further description of each of the components shown inFIG. 1 is provided shortly. First, an overview of some of the featuresprovided by the data storage arrays 120 a-120 b is described.

In the network architecture 100, each of the data storage arrays 120a-120 b may be used for the sharing of data among different servers andcomputers, such as client computer systems 110 a-110 c. In addition, thedata storage arrays 120 a-120 b may be used for disk mirroring, backupand restore, archival and retrieval of archived data, and data migrationfrom one storage device to another. In an alternate embodiment, one ormore client computer systems 110 a-110 c may be linked to one anotherthrough fast local area networks (LANs) in order to form a cluster. Suchclients may share a storage resource, such as a cluster shared volumeresiding within one of data storage arrays 120 a-120 b.

Each of the data storage arrays 120 a-120 b includes a storage subsystem170 for data storage. Storage subsystem 170 may comprise a plurality ofstorage devices 176 a-176 m. These storage devices 176 a-176 m mayprovide data storage services to client computer systems 110 a-110 c.Each of the storage devices 176 a-176 m uses a particular technology andmechanism for performing data storage. The type of technology andmechanism used within each of the storage devices 176 a-176 m may atleast in part be used to determine the algorithms used for controllingand scheduling read and write operations to and from each of the storagedevices 176 a-176 m. The logic used in these algorithms may be includedin one or more of a base operating system (OS) 116, a file system 140,one or more global I/O schedulers 178 within a storage subsystemcontroller 174, control logic within each of the storage devices 176a-176 m, or otherwise. Additionally, the logic, algorithms, and controlmechanisms described herein may comprise hardware and/or software.

Each of the storage devices 176 a-176 m may be configured to receiveread and write requests and comprise a plurality of data storagelocations, each data storage location being addressable as rows andcolumns in an array. In one embodiment, the data storage locationswithin the storage devices 176 a-176 m may be arranged into logical,redundant storage containers or RAID arrays (redundant arrays ofinexpensive/independent disks). In some embodiments, each of the storagedevices 176 a-176 m may utilize technology for data storage that isdifferent from a conventional hard disk drive (HDD). For example, one ormore of the storage devices 176 a-176 m may include or be furthercoupled to storage consisting of solid-state memory to store persistentdata. In other embodiments, one or more of the storage devices 176 a-176m may include or be further coupled to storage using other technologiessuch as spin torque transfer technique, magnetoresistive random accessmemory (MRAM) technique, shingled disks, memristors, phase changememory, or other storage technologies. These different storagetechniques and technologies may lead to differing I/O characteristicsbetween storage devices.

In one embodiment, the included solid-state memory comprises solid-statedrive (SSD) technology. Typically, SSD technology utilizes Flash memorycells. As is well known in the art, a Flash memory cell holds a binaryvalue based on a range of electrons trapped and stored in a floatinggate. A fully erased Flash memory cell stores no or a minimal number ofelectrons in the floating gate. A particular binary value, such asbinary 1 for single-level cell (SLC) Flash, is associated with an erasedFlash memory cell. A multi-level cell (MLC) Flash has a binary value 11associated with an erased Flash memory cell. After applying a voltagehigher than a given threshold voltage to a controlling gate within aFlash memory cell, the Flash memory cell traps a given range ofelectrons in the floating gate. Accordingly, another particular binaryvalue, such as binary 0 for SLC Flash, is associated with the programmed(written) Flash memory cell. A MLC Flash cell may have one of multiplebinary values associated with the programmed memory cell depending onthe voltage applied to the control gate.

The differences in technology and mechanisms between HDD technology andSDD technology may lead to differences in input/output (I/O)characteristics of the data storage devices 176 a-176 m. Generallyspeaking, SSD technologies provide lower read access latency times thanHDD technologies. However, the write performance of SSDs is generallyslower than the read performance and may be significantly impacted bythe availability of free, programmable blocks within the SSD. As thewrite performance of SSDs is significantly slower compared to the readperformance of SSDs, problems may occur with certain functions oroperations expecting latencies similar to reads. Additionally,scheduling may be made more difficult by long write latencies thataffect read latencies. Accordingly, different algorithms may be used forI/O scheduling in each of the data storage arrays 120 a-120 b.

In one embodiment, where different types of operations such as read andwrite operations have different latencies, algorithms for I/O schedulingmay segregate these operations and handle them separately for purposesof scheduling. For example, within one or more of the storage devices176 a-176 m, write operations may be batched by the devices themselves,such as by storing them in an internal cache. When these caches reach agiven occupancy threshold, or at some other time, the correspondingstorage devices 176 a-176 m may flush the cache. In general, these cacheflushes may introduce added latencies to read and/or writes atunpredictable times, which leads to difficulty in effectively schedulingoperations. Therefore, an I/O scheduler may utilize characteristics of astorage device, such as the size of the cache or a measured idle time,in order to predict when such a cache flush may occur. Knowingcharacteristics of each of the one or more storage devices 176 a-176 mmay lead to more effective I/O scheduling. In one embodiment, the globalI/O scheduler 178 may detect a given device of the one or more of thestorage devices 176 a-176 m is exhibiting long response times for I/Orequests at unpredicted times. In response, the global I/O scheduler 178may schedule a given operation to the given device in order to cause thedevice to resume exhibiting expected behaviors. In one embodiment, suchan operation may be a cache flush command, a trim command, an erasecommand, or otherwise. Further details concerning I/O scheduling will bediscussed below.

Components of a Network Architecture

Again, as shown, network architecture 100 includes client computersystems 110 a-110 c interconnected through networks 180 and 190 to oneanother and to data storage arrays 120 a-120 b. Networks 180 and 190 mayinclude a variety of techniques including wireless connection, directlocal area network (LAN) connections, wide area network (WAN)connections such as the Internet, a router, storage area network,Ethernet, and others. Networks 180 and 190 may comprise one or more LANsthat may also be wireless. Networks 180 and 190 may further includeremote direct memory access (RDMA) hardware and/or software,transmission control protocol/internet protocol (TCP/IP) hardware and/orsoftware, router, repeaters, switches, grids, and/or others. Protocolssuch as Fibre Channel, Fibre Channel over Ethernet (FCoE), iSCSI, and soforth may be used in networks 180 and 190. Switch 140 may utilize aprotocol associated with both networks 180 and 190. The network 190 mayinterface with a set of communications protocols used for the Internet160 such as the Transmission Control Protocol (TCP) and the InternetProtocol (IP), or TCP/IP. Switch 150 may be a TCP/IP switch.

Client computer systems 110 a-110 c are representative of any number ofstationary or mobile computers such as desktop personal computers (PCs),servers, server farms, workstations, laptops, handheld computers,servers, personal digital assistants (PDAs), smart phones, and so forth.Generally speaking, client computer systems 110 a-110 c include one ormore processors comprising one or more processor cores. Each processorcore includes circuitry for executing instructions according to apredefined general-purpose instruction set. For example, the x86instruction set architecture may be selected. Alternatively, the Alpha®,PowerPC®, SPARC®, or any other general-purpose instruction setarchitecture may be selected. The processor cores may access cachememory subsystems for data and computer program instructions. The cachesubsystems may be coupled to a memory hierarchy comprising random accessmemory (RAM) and a storage device.

Each processor core and memory hierarchy within a client computer systemmay be connected to a network interface. In addition to hardwarecomponents, each of the client computer systems 110 a-110 c may includea base operating system (OS) stored within the memory hierarchy. Thebase OS may be representative of any of a variety of operating systems,such as, for example, MS-DOS®, MS-WINDOWS®, OS/2®, UNIX®, Linux®,Solaris®, AIX®, DART, or otherwise. As such, the base OS may be operableto provide various services to the end-user and provide a softwareframework operable to support the execution of various programs.Additionally, each of the client computer systems 110 a-110 c mayinclude a hypervisor used to support virtual machines (VMs). As is wellknown to those skilled in the art, virtualization may be used indesktops and servers to fully or partially decouple software, such as anOS, from a system's hardware. Virtualization may provide an end-userwith an illusion of multiple OSes running on a same machine each havingits own resources and access to logical storage entities (e.g., LUNs)built upon the storage devices 176 a-176 m within each of the datastorage arrays 120 a-120 b.

Each of the data storage arrays 120 a-120 b may be used for the sharingof data among different servers, such as the client computer systems 110a-110 c. Each of the data storage arrays 120 a-120 b includes a storagesubsystem 170 for data storage. Storage subsystem 170 may comprise aplurality of storage devices 176 a-176 m. Each of these storage devices176 a-176 m may be an SSD. A controller 174 may comprise logic forhandling received read/write requests. For example, the algorithmsbriefly described above may be executed in at least controller 174. Arandom-access memory (RAM) 172 may be used to batch operations, such asreceived write requests. In various embodiments, when batching writeoperations (or other operations) non-volatile storage (e.g., NVRAM) maybe used.

The base OS 132, the file system 134, any OS drivers (not shown) andother software stored in memory medium 130 may provide functionalityproviding access to files and the management of these functionalities.The base OS 134 and the OS drivers may comprise program instructionsstored on the memory medium 130 and executable by processor 122 toperform one or more memory access operations in storage subsystem 170that correspond to received requests. The system shown in FIG. 1 maygenerally include one or more file servers and/or block servers.

Each of the data storage arrays 120 a-120 b may use a network interface124 to connect to network 180. Similar to client computer systems 110a-110 c, in one embodiment, the functionality of network interface 124may be included on a network adapter card. The functionality of networkinterface 124 may be implemented using both hardware and software. Botha random-access memory (RAM) and a read-only memory (ROM) may beincluded on a network card implementation of network interface 124. Oneor more application specific integrated circuits (ASICs) may be used toprovide the functionality of network interface 124.

In one embodiment, a data storage model may be developed which seeks tooptimize I/O performance. In one embodiment, the model is based at leastin part on characteristics of the storage devices within a storagesystem. For example, in a storage system which utilizes solid statestorage technologies, characteristics of the particular devices may beused to develop models for the devices, which may in turn serve toinform corresponding I/O scheduling algorithms. For example, ifparticular storage devices being used exhibit write latencies that arerelatively high compared to read latencies, such a characteristic may beaccounted for in scheduling operations. It is noted that what isconsidered relatively high or low may vary depending upon the givensystem, the types of data being processed, the amount of data processed,the timing of data, or otherwise. Generally speaking, the system isprogrammable to determine what constitutes a low or high latency, and/orwhat constitutes a significant difference between the two.

Generally speaking, any model which is developed for devices, or acomputing system, will be incomplete. Often, there are simply too manyvariables to account for in a real world system to completely model agiven system. In some cases, it may be possible to develop models whichare not complete but which are nevertheless valuable. As discussed morefully below, embodiments are described wherein storage devices aremodeled based upon characteristics of the devices. In variousembodiments, I/O scheduling is performed based on certain predictions asto how the devices may behave. Based upon an understanding of thecharacteristics of the devices, certain device behaviors are morepredictable than others. In order to more effectively scheduleoperations for optimal I/O performance, greater control over thebehavior of the system is desired. Device behaviors which areunexpected, or unpredictable, make it more difficult to scheduleoperations. Therefore, algorithms are developed which seek to minimizeunpredictable or unexpected behavior in the system.

FIG. 2 provides a conceptual illustration of a device or system that isbeing modeled, and approaches used to minimize unpredictable behaviorswithin the device or system. In a first block 200, an Ideal scenario isdepicted. Shown in block 200 is a system 204 and a model 202 of thatsystem. In one embodiment, the system may be that of a single device.Alternatively, the system may comprises many devices and/or components.As discussed above, the model 202 may not be a complete model of thesystem 204 it seeks to model. Nevertheless, the model 202 capturesbehaviors of interest for purposes of the model. In one embodiment, themodel 202 may seek to model a computing storage system. In the idealscenario 200, the actual behavior of the system 204 is “aligned” withthat of the model 202. In other words, the behavior of the system 204generally comports with those behaviors the model 202 seeks to capture.While the system behavior 204 is in accord with that of the model 202,the system behavior may generally be more predictable. Consequently,scheduling of operations (e.g., read and write operations) within thesystem may be performed more effectively.

For example, if it is desired to optimize read response times, it may bepossible to schedule reads so that they are serviced in a more timelymanner if other behaviors of the system are relatively predictable. Onthe other hand, if system behavior is relatively unpredictable, then alevel of confidence in an ability to schedule those reads to provideresults when desired is diminished. Block 210 illustrates a scenario inwhich system behavior (the smaller circle) is not aligned with that ofthe model of that system (the larger circle). In this case, the systemis exhibiting behaviors which fall outside of the model. Consequently,system behavior is less predictable and scheduling of operations maybecome less effective. For example, if solid state memory devices areused in the storage system, and these devices may initiate actions ontheir own which cause the devices to service requests with greater (orotherwise unexpected) latencies, then any operations which werescheduled for that device may also experience greater or unexpectedlatencies. One example of such a device operation is an internal cacheflush.

In order to address the problem of unexpected or unscheduled systembehaviors and corresponding variable performance, the model which isdeveloped may include actions which it may take to restore the system toa less uncertain state. In other words, should the system beginexhibiting behaviors which degrade the model's ability to predict thesystem's behavior, the model has built into it certain actions it cantake to restore the system to a state wherein the particular unexpectedbehavior is eliminated or rendered less likely. In the example shown, anaction 212 is shown which seeks to “move” the system to a state moreclosely aligned with the model. The action 212 may be termed a“reactive” action or operation as it is performed in response todetecting the system behavior which is outside of the model. Subsequentto performing the action 212, a more ideal state 220 may be achieved.

While developing a model which can react to unpredictable behaviors tomove the system to a more ideal state is desirable, the existence ofthose unpredictable behaviors may still interfere with effectivescheduling operations. Therefore, it would be desirable to minimize theoccurrence of the unexpected behaviors or events. In one embodiment, amodel is developed which includes actions or operations designed toprevent or reduce the occurrence of unexpected behaviors. These actionsmay be termed “proactive” actions or operations as they may generally beperformed proactively in order to prevent the occurrence of somebehavior or event, or change the timing of some behavior or event. Block230 in FIG. 2 illustrates a scenario in which system behavior (thesmaller circle) is within that of the model (the larger circle).Nevertheless, the model takes action 232 to move the system behavior insuch a way that it remains within the model and perhaps more ideallyaligned. The system behavior in block 230 may be seen to be nearing astate where it exhibits behavior outside of the model. In such a casethe model may have some basis for believing the system is nearing such astate. For example, if the I/O scheduler has conveyed a number of writeoperations to a given device, the scheduler may anticipate that thedevice may perform an internal cache flush operation at some time in thefuture. Rather than waiting for the occurrence of such an event, thescheduler may proactively schedule a cache flush operation for thatdevice so that the cache flush is performed at a time of the scheduler'schoosing. Alternatively, or in addition to the above, such proactiveoperations could be performed at random times. While the cache flushstill occurs, its occurrence is not unexpected and it has now becomepart of the overall scheduling performed by the scheduler and may bemanaged in a more effective and intelligent manner. Subsequent toperforming this proactive action 232, the system may generally be seento be in a more predictable state 240. This is because a cache flush wasscheduled and performed on the device and the likelihood of the devicespontaneously initiating an internal cache flush on its own is reduced(i.e., its cache has already been flushed). By combining both reactiveand proactive actions or operations within the model, greater systempredictability may be achieved and improved scheduling may likewise beachieved.

Referring now to FIG. 3, one embodiment of a method 300 for performingI/O scheduling to reduce unpredicted behaviors is shown. The componentsembodied in network architecture 100 and data storage arrays 120 a-120 bdescribed above may generally operate in accordance with method 300. Thesteps in this embodiment are shown in sequential order. However, somesteps may occur in a different order than shown, some steps may beperformed concurrently, some steps may be combined with other steps, andsome steps may be absent in another embodiment.

In block 302, an I/O scheduler schedules read and write operations forone or more storage devices. In various embodiments, the I/O schedulermay maintain a separate queue (either physically or logically) for eachstorage device. In addition, the I/O scheduler may include a separatequeue for each operation type supported by a corresponding storagedevice. For example, an I/O scheduler may maintain at least a separateread queue and a separate write queue for an SSD. In block 304, the I/Oscheduler may monitor the behavior of the one or more storage devices.In one embodiment, the I/O scheduler may include a model of acorresponding storage device (e.g., a behavioral type model and/oralgorithms based at least in part on a model of the device) and receivestate data from the storage device to input to the model. The modelwithin the I/O scheduler may both model and predict behavior of thestorage device by utilizing known and/or observed characteristics of thestorage device.

The I/O scheduler may detect characteristics of a given storage devicewhich affect, or may affect, I/O performance. For example, as will bediscussed further below, various characteristics and states of devices,and of I/O traffic, may be maintained. By observing thesecharacteristics and states, the I/O scheduler may predict that a givendevice may soon enter a state wherein it exhibits high I/O latencybehavior. For example, in one embodiment, the I/O scheduler may detector predict that an internal cache flush is about to occur within astorage device which may affect the response times of requests to thestorage device. For example, in one embodiment, a storage device thatsits idle for a given amount of time may flush its internal cache. Insome embodiments, whether a given device is idle may be based on aperspective external to the device. For example, if an operation has notbeen scheduled for a device for a period of time, the device may bedeemed to be idle for approximately that period of time. In such anembodiment, the device could in fact be busy based on internallyinitiated activity within the device. However, such internally initiatedactivity would not be considered in determining whether the device isidle. In other embodiments, internally initiated activities of a devicecould be considered when determining whether a device is idle or busy.By observing the behavior of the device, and noting it has been idle fora given amount of time, the scheduler may predict when an internal cacheflush might occur. In other embodiments, the scheduler may also have theability to poll devices to determine various states or conditions of thedevices. In any event, the scheduler may be configured to determine thepotential for unscheduled behaviors such as internal cache flushes andinitiate a proactive operation in order to prevent the behavior fromoccurring. In this manner, the scheduler controls the timing of eventsin the device, and the system, and is better able to scheduleoperations.

Various characteristics may be used to as a basis for making predictionsregarding device behavior. In various embodiments, the scheduler maymaintain a status of currently pending operations and/or a history ofrecent operations corresponding to the storage devices. In someembodiments, the I/O scheduler may know the size of a cache within adevice and/or the caching policies and maintain a count of a number ofwrite requests sent to the storage device. In other embodiments, othermechanisms may be available for determining the state of a cache withina device (e.g., direct polling type access to the device). In addition,the I/O scheduler may track the amount of data in write requests sent tothe storage device. The I/O scheduler may then detect when either anumber of write requests or a total amount of data corresponding to thewrite requests reaches a given threshold. If the I/O scheduler detectssuch a condition (conditional block 306), then in block 308, the I/Oscheduler may schedule a particular operation for the device. Such anoperation may generally correspond to the above described proactiveoperations. For example, the I/O scheduler may place a cache flushcommand in a corresponding queue to force the storage device to performa cache flush at a time of the scheduler's choosing. Alternatively, theI/O scheduler may place a dummy read operation in the queue in order todetermine whether or not any cache flush on the storage device hascompleted. Still further, the scheduler could query a device to obtainstatus information (e.g., idle, busy, etc.). These and othercharacteristics and operations are possible and are contemplated. Inaddition, in various embodiments proactive operations may be scheduledwhen reconditioning an SSD in place. In such an embodiment, the SSDfirmware and/or mapping tables may get into a state where requests hangor are permanently slow. It may be possible to just reset the drive orpower the drive off and on to unclog the firmware. However if thecondition is permanent (i.e. a bug in the firmware that can't handle thecurrent state of the mapping tables) another way to fix it is toreformat the drive to completely clean and reset the FTL and thenrepopulate it or reuse it for something other data.

The actions described above may be performed to prevent or reduce anumber of occurrences of unpredicted variable response times.Simultaneously, the I/O scheduler may detect the occurrence of anyvariable behavior of a given storage device at an unpredicted time. Ifthe I/O scheduler detects such a condition (conditional block 310), thenin block 312, the I/O scheduler may place an operation in acorresponding queue of the storage device. In this case, the operationmay generally correspond to the above described reactive operations. Theoperation may be used both to reduce the amount of time the storagedevice provides variable behavior and to detect the end of the variantbehavior. In various embodiments, proactive and/or reactive operationsmay generally include any operation capable of placing a device into (atleast in part) a known state. For example, initiating a cache flushoperation may result in the device achieving an empty cache state. Adevice with a cache that is empty may be less likely to initiate aninternal cache flush than a device whose cache is not empty. Someexamples of proactive and/or reactive operations include cache flushoperations, erase operations, secure erase operations, trim operations,sleep operations, hibernate operations, powering on and off, and resetoperations.

Referring now to FIG. 4, one embodiment of a method 400 for segregatingoperations issued to a storage device is shown. The steps in thisembodiment are shown in sequential order. However, some steps may occurin a different order than shown, some steps may be performedconcurrently, some steps may be combined with other steps, and somesteps may be absent in another embodiment. In various embodiments,operations of a first type may be segregated from operations of a secondtype for scheduling purposes. For example, in one embodiment operationsof a first type may be given scheduling priority over operations of asecond type. In such an embodiment, operations of the first type may bescheduled for processing relatively quickly, while operations of thesecond type are queued for later processing (in effect postponing theprocessing of the operations). At a given point in time, processing ofoperations of the first type may be halted while the previously queuedoperations (of the second type) are processed. Subsequently, processingof the second operation type may again be stopped while processingpriority is returned to operations of the first type. When processing ishalted for one type and begins for another type may be based uponperiods of time, accumulated data, transaction frequency, availableresources (e.g., queue utilization), any combination of the above, orbased upon any desired condition as desired.

For random read and write requests, an SSD typically demonstrates betterperformance than a HDD. However, an SSD typically exhibits worseperformance for random write requests than read requests due to thecharacteristics of an SSD. Unlike an HDD, the relative latencies of readand write requests are quite different, with write requests typicallytaking significantly longer than read requests because it takes longerto program a Flash memory cell than read it. In addition, the latency ofwrite operations can be quite variable due to additional operations thatneed to be performed as part of the write. For example, an eraseoperation may be performed prior to a write or program operation for aFlash memory cell, which is already modified. Additionally, an eraseoperation may be performed on a block-wise basis. In such a case, all ofthe Flash memory cells within a block (an erase segment) are erasedtogether. Because a block is relatively large and comprises multiplepages, the operation may take a relatively long time. Alternatively, theFTL may remap a block into an already erased erase block. In eithercase, the additional operations associated with performing a writeoperation may cause writes to have a significantly higher variability inlatency as well as a significantly higher latency than reads. Otherstorage device types may exhibit different characteristics based onrequest type. In addition to the above, certain storage devices mayoffer poor and/or variable performance if read and write requests aremixed. Therefore, in order to improve performance, various embodimentsmay segregate read and write requests. It is noted that while thediscussion generally speaks of read and write operations in particular,the systems and methods described herein may be applied to otheroperations as well. In such other embodiments, other relatively high andlow latency operations may be identified as such and segregated forscheduling purposes. Additionally, in some embodiments reads and writesmay be categorized as a first type of operation, while other operationssuch as cache flushes and trim operations may be categorized ascorresponding to a second type of operation. Various combinations arepossible and are contemplated.

In block 402, an I/O scheduler may receive and buffer I/O requests for agiven storage device of one or more storage devices. In block 404,low-latency I/O requests may generally be issued to the storage devicein preference to high latency requests. For example, depending on thestorage technology used by the storage devices, read

requests may have lower latencies than write requests and other commandtypes and may issue first. Consequently, write requests may beaccumulated while read requests are given issue priority (i.e., areconveyed to the device ahead of write requests). At some point in time,the I/O scheduler may stop issuing read requests to the device and beginissuing write requests. In one embodiment, the write requests may beissued as a stream of multiple writes. Therefore, the overheadassociated with a write request may be amortized over multiple writerequests. In this manner, high latency requests (e.g., write requests)and low latency requests (e.g., read requests) may be segregated andhandled separately.

In block 406, the I/O scheduler may determine whether a particularcondition exists which indicates high latency requests should beconveyed to a device(s). For example, in one embodiment detecting such acondition may comprise detecting a given number of high latency I/Orequests, or an amount of corresponding data, has accumulated andreached a given threshold. Alternatively, a rate of high latencyrequests being received may reach some threshold. Numerous suchconditions are possible and are contemplated. In one embodiment, thehigh-latency requests may be write requests. If such a condition occurs(conditional block 408), then in block 410, the I/O scheduler may beginissuing high-latency I/O requests to the given storage device. Thenumber of such requests issued may vary depending upon a givenalgorithm. The number could correspond to a fixed or programmable numberof writes, or an amount of data. Alternatively, writes could be issuedfor a given period of time. For example, the period of time may lastuntil a particular condition ceases to exist (e.g., a rate of receivedwrites falls), or a particular condition occurs. Alternatively,combinations of any of the above may be used in determining when tobegin and when to stop issuing high latency requests to the device(s).In some embodiments, the first read request after a stream of writerequests may be relatively slow compared to other read requests. Inorder to avoid scheduling a “genuine” read requests in the issue slotimmediately following a stream of write requests, the I/O scheduler maybe configured to automatically schedule a “dummy” read following thestream of write requests. In this context a “genuine” read is a read forwhich data is requested by a user or application, and a “dummy” read isan artificially created read whose data may simply be discarded. Invarious embodiments, until the dummy read is detected as finished, thewrite requests may not be determined to have completed. Also, in variousembodiments, a cache flush may follow a stream of writes and be used todetermine when the writes have completed.

Referring now to FIG. 5, one embodiment of a method 500 for developing amodel to characterize the behavior of storage devices in a storagesubsystem is shown. The steps in this embodiment are shown in sequentialorder. However, some steps may occur in a different order than shown,some steps may be performed concurrently, some steps may be combinedwith other steps, and some steps may be absent in another embodiment.

In block 502, one or more storage devices may be selected to be used ina storage subsystem. In block 504, various characteristics for eachdevice may be identified such as cache sizes, typical read and writeresponse times, storage topology, an age of the device, and so forth. Inblock 506, one or more characteristics which affect I/O performance fora given storage device may be identified.

In block 508, one or more actions which affect the timing and/oroccurrences of the characteristics for a given device may be determined.Examples may include a cache flush and execution of given operationssuch as an erase operation for an SSD. For example, a force operationsuch as a cache flush may reduce the occurrence of variable responsetimes of an SSD at unpredicted times. In block 510, a model may bedeveloped for each of the one or more selected devices based oncorresponding characteristics and actions. This model may be used insoftware, such as within an I/O scheduler within a storage controller.

Turning now to FIG. 6, a generalized block diagram of one embodiment ofa storage subsystem is shown. In the embodiment shown, each of thestorage devices 176 a-176 m are shown within a single device group.However, in other embodiments, one or more storage devices 176 a-176 mmay be partitioned in two or more of the device groups 173 a -173 m. Oneor more corresponding operation queues and status tables for eachstorage device may be included in the device units 600 a-600 w. Thesedevice units may be stored in RAM 172. A corresponding I/O scheduler 178may be included for each one of the device groups 173 a -173 m. Each I/Oscheduler 178 may include a monitor 610 that tracks state data for eachof the storage devices within a corresponding device group. Schedulinglogic 620 may perform the decision of which requests to issue to acorresponding storage device and determine the timing for issuingrequests.

Turning now to FIG. 7, a generalized block diagram of one embodiment ofa device unit 600 is shown. Device unit 600 may comprise a device queue710 and tables 720. Device queue 710 may include a read queue 712, awrite queue 714 and one or more other queues such as other operationqueue 716. Each queue may comprise a plurality of entries 730 forstoring one or more corresponding requests. For example, a device unitfor a corresponding SSD may include queues to store at least readrequests, write requests, trim requests, erase requests and so forth.Tables 720 may comprise one or more state tables 722 a -722 b, eachcomprising a plurality of entries 730 for storing state data. In variousembodiments, the queues shown in FIG. 7 may be either physically and/orlogically separate. It is also noted that while the queues and tablesare shown to include a particular number of entries, the entriesthemselves do not necessarily correspond to one another. Additionally,the number of queues and tables may vary from that shown in the figure.In addition, entries within a given queue, or across queues, may beprioritized. For example, read requests may have a high, medium, or lowpriority which affects an order within which the request is issued tothe device. In addition, such priorities may be changeable dependingupon various conditions. For example, a low priority read that reaches acertain age may have its priority increased. Numerous suchprioritization schemes and techniques are known to those skilled in theart. All such approaches are contemplated and may be used in associationwith the systems and methods described herein.

Referring now to FIG. 8, a generalized block diagram illustrating oneembodiment of a state table such as that shown in FIG. 7 is shown. Inone embodiment, such a table may include data corresponding to state,error, wear level information, and other information for a given storagedevice. A corresponding I/O scheduler may have access to thisinformation, which may allow the I/O scheduler to better schedule I/Orequests to the storage devices. In one embodiment, the information mayinclude at least one or more of a device age 802, an error rate 804, atotal number of errors detected on the device 806, a number ofrecoverable errors 808, a number of unrecoverable errors 810, an accessrate of the device 812, an age of the data stored 814, a correspondingcache size 816, a corresponding cache flush idle time 818, one or moreallocation states for allocation spaces 820-822, a concurrency level824, and expected time(s) 826 for various operations. The allocationstates may include filled, empty, error and so forth. The concurrencylevel of a given device may include information regarding the ability ofthe device to handle multiple operations concurrently. For example, if adevice has 4 flash chips and each one is capable of doing one transferat a time, then the device may be capable of up to 4 paralleloperations. Whether or not particular operations may be performed inparallel may depend on how the data was laid out on the device. Forexample, if the data inside of the device is laid out where the dataaccessed by a request is all on one chip then operations on that datacould proceed in parallel with requests accessing data on differentchips. However, if the data accessed by a request is striped acrossmultiple chips, then requests may interfere with one other.Consequently, a device may be capable of a maximum of Nparallel/concurrent operations (e.g., 4 in the above described as wherethe device has 4 chips). Alternatively, the maximum level of concurrencymay be based upon the types of operations involved. In any event, storedinformation indicative of a level of concurrency N, and a number ofpending transactions M, may be taken into account by the scheduler whenscheduling operations.

Referring now to FIG. 9, another embodiment of a method 900 foradjusting I/O scheduling to reduce unpredicted variable I/O responsetimes on a data storage subsystem is shown. The components embodied innetwork architecture 100 and data storage arrays 120 a-120 b describedabove may generally operate in accordance with method 900. For purposesof discussion, the steps in this embodiment are shown in sequentialorder. However, some steps may occur in a different order than shown,some steps may be performed concurrently, some steps may be combinedwith other steps, and some steps may be absent in another embodiment.

In block 902, an I/O scheduler may monitor the behavior of each one ofthe storage devices. Conditional blocks 904-908 illustrate oneembodiment of detecting characteristics of a given device which mayaffect I/O performance as described above regarding conditional step 306of method 300. In one embodiment, if the I/O scheduler detects a givendevice exceeds a given idle time (conditional block 904) or detects acorresponding cache exceeds an occupancy threshold (conditional block906) or detects a cached data exceeds a data age threshold (conditionalblock 908), then in block 910, the I/O scheduler may issue a force(proactive) operation to the given storage device. In such a case, thescheduler may predict that an internal cache flush will occur soon andat an unpredictable time. In order to avoid occurrence of such an event,the I/O scheduler proactively schedules an operation to avert the event.

It is noted that aversion of an event as described above may mean theevent does not occur, or does not occur at an unpredicted or unexpectedtime. In other words, the scheduler generally prefers that given eventsoccur according to the scheduler's timing and not otherwise. In thissense, a long latency event occurring because the scheduler scheduledthe event is better than such an event occurring unexpectedly. Timersand counters within the scheduling logic 620 may be used in combinationwith the monitor 610 to perform at least these detections. One exampleof a force operation issued to the given storage device may include acache flush. Another example of a force operation may include an eraserequest. A force operation may be sent from the I/O scheduler to acorresponding queue in the device queue 710 within a correspondingdevice unit 600 as part of the scheduling.

Referring now to FIG. 10, one embodiment of a method 1000 formaintaining read operations with relatively low latencies on shared datastorage is shown. The components embodied in network architecture 100and data storage arrays 120 a-120 b described above may generallyoperate in accordance with method 1000. For purposes of discussion, thesteps in this embodiment are shown in sequential order. However, somesteps may occur in a different order than shown, some steps may beperformed concurrently, some steps may be combined with other steps, andsome steps may be absent in another embodiment.

In block 1002, an Amount of redundancy in a RAID architecture for astorage subsystem may be determined to be used within a given devicegroup 173. For example, for a 4+2 RAID group, 2 of the storage devicesmay be used to store erasure correcting code (ECC) information, such asparity information. This information may be used as part of reconstructread requests. In one embodiment, the reconstruct read requests may beused during normal I/O scheduling to improve performance of a devicegroup while a number of storage devices are detected to be exhibitingvariable I/O response times. In block 1004, a maximum number of deviceswhich may be concurrently busy, or exhibiting variable response time,within a device group is determined. This maximum number may be referredto as the Target number. In one embodiment, the storage devices are SSDswhich may exhibit variable response times due to executing writerequests, erase requests, or cache flushes. In one embodiment, thetarget number is selected such that a reconstruct read can still beperformed.

In one embodiment, an I/O scheduler may detect a condition whichwarrants raising the Target number to a level where a reconstruct readis no longer efficient. For example, a number of pending write requestsfor a given device may reach a waiting threshold (i.e., the writerequests have been pending for a significant period of time and it isdetermined they should wait no longer). Alternatively, a given number ofwrite requests may be detected which have a relatively high-prioritywhich cannot be accumulated for later issuance as discussed above. Ifthe I/O scheduler detects such a condition (conditional block 1006),then in block 1008, the I/O scheduler may increment or decrement theTarget based on the one or more detected conditions. For example, theI/O scheduler may allow the Target to exceed the Amount of supportedredundancy if an appropriate number of high-priority write requests arepending, or some other condition occurs. In block 1010, the I/Oscheduler may determine N storage devices within the device group areexhibiting variable I/O response times. If N is greater than Target(conditional block 1012), then in block 1014, the storage devices may bescheduled in a manner to reduce N. Otherwise, in block 1016, the I/Oscheduler may schedule requests in a manner to improve performance. Forexample, the I/O scheduler may take advantage of the capability ofreconstruct read requests as described further below.

Referring now to FIG. 11, one embodiment of a method 1100 for reducing anumber of storage devices exhibiting variable I/O response times isshown. The steps in this embodiment are shown in sequential order.However, some steps may occur in a different order than shown, somesteps may be performed concurrently, some steps may be combined withother steps, and some steps may be absent in another embodiment.

In block 1102, an I/O scheduler may determine to reduce a number N ofstorage devices within a storage subsystem executing high-latencyoperations which cause variable response times at unpredicted times. Inblock 1104, the I/O scheduler may select a given device executinghigh-latency operations. In block 1106, the I/O scheduler may halt theexecution of the high-latency operations on the given device anddecrement N. For example, the I/O scheduler may stop issuing writerequests and erase requests to the given storage device. In addition,the corresponding I/O scheduler may halt execution of issued writerequests and erase requests. In block 1108, the I/O scheduler mayinitiate execution of low-latency operations on the given device, suchas read requests. These read requests may include reconstruct readrequests. In this manner, the device leaves a long latency responsestate and N is reduced.

Turning now to FIG. 12, one embodiment of a method for maintaining readoperations with efficient latencies on shared data storage is shown. Thecomponents embodied in network architecture 100 and data storage arrays120 a-120 b described above may generally operate in accordance with themethod. For purposes of discussion, the steps in this embodiment areshown in sequential order. However, some steps may occur in a differentorder than shown, some steps may be performed concurrently, some stepsmay be combined with other steps, and some steps may be absent inanother embodiment.

The method of FIG. 12 may represent one embodiment of steps taken toperform step 1016 in method 1000. In block 1201, an I/O schedulerreceives an original read request directed to a first device that isexhibiting variable response time behavior. The first device may beexhibiting variable response times due to receiving a particularscheduled operation (i.e., a known reason) or due to some unknownreason. In various embodiments what is considered a variable responsetime may be determined based at least in part on an expected latency fora given operation. For example, based upon characteristics of a deviceand/or a recent history of operations, a response to a given read may beexpected to occur within a given period of time. For example, an averageresponse latency could be determined for the device with a deltadetermined to reflect a range of acceptable response latencies. Such adelta could be chosen to account for 99% of the transactions, or anyother suitable number of transactions. If a response is not receivedwithin the expected period of time, then initiation of a reconstructread may be triggered.

Generally speaking, whether or not a reconstruct read is imitated may bebased upon a cost benefit analysis which compares the costs associatedwith performing the reconstruct read with the (potential) benefits ofobtaining the results of the reconstruct read. For example, if aresponse to an original read request in a given device is not receivedwithin a given period of time, it may be predicted that the device isperforming an operation that will result in a latency that exceeds thatof a reconstruct read were one to be initiated. Therefore, a reconstructread may be initiated. Such an action may be taken to (for example)maintain a given level of read service performance. It is noted thatother factors may be considered as well when determining whether toinitiate a reconstruct read, such as current load, types of requestsbeing received, priority of requests, the state of other devices in thesystem, various characteristics as described in FIGS. 7 and 8, and soon. Further, it is noted that while a reconstruct read may be initiateddue to a relatively long response latency for the original read, it isexpected that the original read request will in fact complete. In factboth the original read and the reconstruct read may successfullycomplete and provide results. Consequently, the reconstruct read is notrequired in order for the original request to be serviced. This is incontrast to a latency that is due to an error condition, such asdetecting a latency and some indication of an error that indicates thetransaction will (or may) not complete successfully. For example, adevice timeout due to an inability to read a given storage locationrepresents a response which is not expected to complete. In such cases,a reconstruct read may be required in order to service the request.Accordingly, in various embodiments the system may effectively includeat least two timeout conditions for a given device. The first timeoutcorresponds to a period of time after which a reconstruct read may beinitiated even though not necessarily required. In this manner,reconstruct reads may be incorporated into the scheduling algorithms asa normal part of the non-error related scheduling process. The secondtimeout, occurring after the first timeout, represents a period of timeafter which an error condition is believed to have occurred. In thiscase a reconstruct read may also be initiated due to an expectation thatthe original read will not be serviced by the device indicating theerror.

In view of the above, the I/O scheduler may then determine whether areconstruct read corresponding to the original read is to be initiated(decision block 1202). The reconstruct read would generally entail oneor more reads serviced by devices other than the first device. Indetermining whether a reconstruct read is to be initiated, many factorsmay be taken into account. Generally speaking, the I/O scheduler engagesin a cost/benefit analysis to determine whether it may be “better” toattempt to service the original read with the first device, or attemptto service the original read by issuing a reconstruct read. As discussedabove a number of factors may be considered when determining whether toinitiate a reconstruct read. What is “better” in a given situation mayvary, may be programmable, and may be determined dynamically. Forexample, an algorithm may be such that it always favors faster readresponse times. In such a case, a determination may be made as towhether servicing of the reconstruct read can (or may) complete prior toservicing of the original read by the original device. Alternatively, analgorithm may determine that a reduced system load is favored at a giventime. In such a case, the I/O scheduler may choose not to initiate areconstruct read with its additional overhead—even if the reconstructread may complete faster than the original read. Still further, a morenuanced balancing of speed versus overhead may be used in suchdeterminations. In various embodiments, the algorithm may beprogrammable with an initial weighting (e.g., always prefer speedirrespective of loading). Such a weighting could be constant, or couldbe programmable to vary dynamically according to various conditions. Forexample, conditions could include time of day, a rate of received I/Orequests, the priority of received requests, whether a particular taskis detected (e.g., a backup operation is currently being performed),detection of a failure, and so on.

If the scheduler decides not to initiate a reconstruct read, then theread may be serviced by the originally targeted device (block 1203).Alternatively, a reconstruct read may be initiated (block 1204). In oneembodiment, the other devices which are selected for servicing thereconstruct read are those which are identified as exhibitingnon-variable behavior. By selecting devices which are exhibitingnon-variable behavior (i.e., more predictable behavior), the I/Oscheduler is better able to predict how long it may take to service thereconstruct read. In addition to the given variable/non-variablebehavior of a device, the I/O scheduler may also take in toconsideration other aspects of each device. For example, in selecting aparticular device for servicing a reconstruct read, the I/O schedulermay also evaluate a number of outstanding requests for a given device(e.g., how full is the device queue), the priority of requests currentlypending for a given device, the expected processing speed of the deviceitself (e.g., some devices may represent an older or otherwiseinherently slower technology than other devices), and so on. Further,the scheduler may desire to schedule the reconstruct read in such a waythat the corresponding results from each of the devices is returned atapproximately the same time. In such a case, the scheduler may disfavora particular device for servicing a reconstruct read if it is predictedits processing time would differ significantly from the otherdevices—even if it were much faster than the other devices. Numeroussuch factors and conditions to consider are possible and arecontemplated.

In one embodiment, the reconstruct read requests may inherit a prioritylevel of the original read request. In other embodiments, thereconstruct read requests may have priorities that differ from theoriginal read request. If the I/O scheduler detects a selected second(other) device receiving a corresponding reconstruct read request is nowexhibiting variable response time behavior (conditional block 1205) andthis second device is predicted to remain variable until after the firstdevice is predicted to become non-variable (conditional block 1206),then in block 1208, the I/O scheduler may issue the original readrequest to the first device. In one embodiment, timers may be used topredict when a storage device exhibiting variable response times mayagain provide non-variable response times. Control flow of method 1200moves from block 1208 to conditional block 1212 via block C. If thesecond device is not predicted to remain variable longer than the firstdevice (conditional block 1206), then control flow of method 1200 movesto block 1210. In block 1210, the read request is serviced by the issuedreconstruct read requests.

If the I/O scheduler detects the given variable device becomesnon-variable (conditional block 1212), then in block 1214, the I/Oscheduler issues the original read request to the given device. The I/Oscheduler may designate the given device as non-variable and decrement N(the number of storage devices detected to provide variable I/O responsetimes). If the original read request finishes before the alternatereconstruct read requests (conditional block 1216), then in block 1218,the I/O scheduler services the read request with the original readrequest. In various embodiments, the scheduler may remove the rebuildread requests. Alternatively, the reconstruct read requests may completeand their data may simply be discarded. Otherwise, in block 1220, theI/O scheduler services the read request with the reconstruct readrequests and may remove the original read request (or discard itsreturned data).

It is noted that the above-described embodiments may comprise software.In such an embodiment, the program instructions that implement themethods and/or mechanisms may be conveyed or stored on a computerreadable medium. Numerous types of media which are configured to storeprogram instructions are available and include hard disks, floppy disks,CD-ROM, DVD, flash memory, Programmable ROMs (PROM), random accessmemory (RAM), and various other forms of volatile or non-volatilestorage.

In various embodiments, one or more portions of the methods andmechanisms described herein may form part of a cloud-computingenvironment. In such embodiments, resources may be provided over theInternet as services according to one or more various models. Suchmodels may include Infrastructure as a Service (IaaS), Platform as aService (PaaS), and Software as a Service (SaaS). In IaaS, computerinfrastructure is delivered as a service. In such a case, the computingequipment is generally owned and operated by the service provider. Inthe PaaS model, software tools and underlying equipment used bydevelopers to develop software solutions may be provided as a serviceand hosted by the service provider. SaaS typically includes a serviceprovider licensing software as a service on demand. The service providermay host the software, or may deploy the software to a customer for agiven period of time. Numerous combinations of the above models arepossible and are contemplated. Additionally, while the above descriptionfocuses on networked storage and controller, the above described methodsand mechanism may also be applied in systems with direct attachedstorage, host operating systems, and otherwise.

Although the embodiments above have been described in considerabledetail, numerous variations and modifications will become apparent tothose skilled in the art once the above disclosure is fully appreciated.It is intended that the following claims be interpreted to embrace allsuch variations and modifications.

What is claimed is:
 1. A computer system comprising: a data storagemedium comprising a plurality of storage devices configured to storedata; and a data storage controller coupled to the data storage medium;wherein the data storage controller is configured to: receive requeststargeted to the data storage medium, said requests including a firsttype of operation and a second type of operation; schedule requests ofthe first type for immediate processing by said plurality of storagedevices; and queue requests of the second type for later processing bythe plurality of storage devices.
 2. The computer system as recited inclaim 1, wherein operations of the first type correspond to operationswith an expected relatively low latency, and operations of the secondtype correspond to operations with an expected relatively high latency.3. The computer system as recited in claim 2, wherein operations of thefirst type correspond to read requests, and operations of the secondtype correspond to write requests, cache flushes, or trim operations. 4.The computer system as recited in claim 1, wherein said plurality ofstorage devices are solid state storage devices, and wherein each ofsaid solid state storage devices processes read requests with arelatively low latency, and processes write requests with a relativelyhigh latency.
 5. The computer system as recited in claim 1, whereinsubsequent to queuing a plurality of requests corresponding to thesecond type of operation, the storage controller is configured to ceaseprocessing requests corresponding to the first type of operation andprocess only those requests corresponding to the second type ofoperation.
 6. The computer system as recited in claim 5, wherein theplurality of requests corresponding to the second type of operationcorrespond to write requests, and wherein the storage controller isconfigured to automatically schedule a dummy read to the given device tofollow the write requests.
 7. The computer system as recited in claim 5,wherein the storage controller is configured to discontinue processingthose requests corresponding to the second type of operation, inresponse to detecting another device of the plurality of devices isexhibiting a relatively long response latency.
 8. The computer system asrecited in claim 2, wherein the plurality of requests corresponding tothe second type of operation correspond to write requests, and whereinthe storage controller is configured to stream said write requests as aplurality of discrete units of data for processing, the storagecontroller being able to stop said streaming after any of said units. 9.The computer system as recited in claim 1, wherein the storagecontroller is configured to stop processing requests corresponding tothe first type immediately and begin processing queued requestscorresponding to the second type in response to detecting a givencondition.
 10. The computer system as recited in claim 9, wherein saidcondition comprises at least one of: a particular number of requests ofthe second type have been queued, a period of time has elapsed sincerequests of the second type were processed, and no new requests havebeen received for a given period of time.
 11. A method for use in acomputing system, the method comprising: receiving requests targeted toa data storage medium comprising a plurality of storage devicesconfigured to store data, said requests including a first type ofoperation and a second type of operation; scheduling requests of thefirst type for immediate processing by said plurality of storagedevices; and queuing requests of the second type for later processing bythe plurality of storage devices.
 12. The method as recited in claim 11,wherein operations of the first type correspond to operations with anexpected relatively low latency, and operations of the second typecorrespond to operations with an expected relatively high latency. 13.The method as recited in claim 12, wherein operations of the first typecorrespond to read requests, and operations of the second typecorrespond to write requests, cache flushes, or trim operations.
 14. Themethod as recited in claim 11, wherein said plurality of storage devicesare solid state storage devices, and wherein each of said solid statestorage devices processes read requests with a relatively low latency,and processes write requests with a relatively high latency.
 15. Themethod as recited in claim 11, wherein subsequent to queuing a pluralityof requests corresponding to the second type of operation, the methodcomprises ceasing processing of requests corresponding to the first typeof operation and processing only those requests corresponding to thesecond type of operation.
 16. The method as recited in claim 15, whereinthe plurality of requests corresponding to the second type of operationcorrespond to write requests, and wherein the method comprisesautomatically scheduling a dummy read to the given device to follow thewrite requests.
 17. The method as recited in claim 15, wherein themethod comprises discontinuing processing those requests correspondingto the second type of operation, in response to detecting another deviceof the plurality of devices is exhibiting a relatively long responselatency.
 18. The method as recited in claim 12, wherein the plurality ofrequests corresponding to the second type of operation correspond towrite requests, and wherein the method comprises streaming said writerequests as a plurality of discrete units of data for processing, themethod being able to stop said streaming after any of said units.
 19. Acomputer readable storage medium comprising program instructions,wherein when executed by a processing device, the program instructionsare operable to: receive requests targeted to a data storage mediumcomprising a plurality of storage devices configured to store data, saidrequests including a first type of operation and a second type ofoperation; schedule requests of the first type for immediate processingby said plurality of storage devices; and queue requests of the secondtype for later processing by the plurality of storage devices.
 20. Thecomputer readable medium as recited in claim 19, wherein operations ofthe first type correspond to operations with an expected relatively lowlatency, and operations of the second type correspond to operations withan expected relatively high latency.